1. Field of the Invention
The present invention relates to a color converting device that converts a pixel value represented in a predetermined color space into a pixel value represented in a different color space and outputs the converted pixel value.
2. Description of the Related Arts
There is a device that converts an input pixel value represented in a predetermined color space into a pixel value represented in a different color space and outputs the converted pixel value as an output pixel value. The color space in which the input pixel value is represented is referred to as an input color space and the color space in which the output pixel value is represented is referred to as an output color space hereinbelow. There have been various devices adopting various methods for converting a pixel value.
For example, there is a device that an input color space represented by RGB is converted into an output color space represented by YCbCr, as is well known as a television set. The color space processing from RGB into YCbCr can be represented by a simple conversion equation of Y=0.6G+0.3R+0.1B, Cb=Yxe2x88x92B, Cr=Yxe2x88x92R. Accordingly, a color converting device from RGB into YCbCr can be realized by an arithmetical device that processes the conversion equation.
However, there is a case where a complicate conversion process from the input color space into the output color space cannot be represented by a simple conversion equation. Example of such a case is the one for converting RGB inputted by a scanner into YMC of a printing device. The RGB is a color space according to spectrum characteristics of an optical sensor of the scanner, while the YMC is a color space according to spectrum characteristics of ink of the printing device or tone characteristics of a mesh point, so that the relationship between RGB and YMC frequently becomes a nonlinear to afford a complicate conversion equation. Therefore, a realization of a converting device by using an arithmetical device executing the conversion equation entails a problem of large-sized device or long processing period.
In order to deal with the case where the conversion from the input color space into the output color space is complicate, there has been proposed a device that stores an output pixel value corresponding to an input pixel value in a conversion table in advance and performs a processing for simply referring the Conversion table to thereby realize a color conversion.
However, such a device has a problem that a capacity of the conversion table rapidly increases as the kind of the input pixel value, i.e., the tone number increases. For example, the capacity of the conversion table is n3 in case where the input color space is represented by n tone of each RGB.
In order to deal with the case of plenty of tone numbers of the input pixel value, there has been proposed a device in which a conversion table is divided into plural portions for storing an output pixel value only at a position of a lattice point of a subspace. If there is no lattice point corresponding to the input pixel value, a value of a lattice point in the vicinity thereof is interpolated to be used. Specifically, such a converting device comprises, as shown in FIG. 13, a pixel value inputting part 101, index converting part 102, delta converting part 103, coefficient storing part 106 and interpolating part 108. With respect to the lattice point positioned at the boundary of a subspace of an input color space, a corresponding output pixel value (referred to as interpolation coefficient hereinbelow) is stored in advance in the coefficient storing part 106. Further, this device converts the input pixel value 110 into a position (index) 111 of a subspace and a position (delta signal) 112 in the subspace. An interpolation coefficient 120 corresponding to the lattice point that composes the subspace is taken out from the conversion table based upon the index, whereupon the interpolating part 108 performs an interpolation by using the interpolation coefficient 120 and the position (delta signal) 112 in the subspace for obtaining an output pixel value 123. Such a construction can reduce the capacity of the conversion table. This type of color converting device is disclosed, for example, in Japanese Published Examined Patent Application No. Sho 58-16180. 
However, the problem of increasing the number of referring times of the conversion table still exists depending upon the interpolating method. When the number of the referring lattice point is designated by G, the number of referring times to the conversion table is proportional to G. In the case of input color space of three colors such as RGB, for example, a considered case is the one in which the input color space is divided into a plurality of rectangular solids and a linear interpolation is performed by using eight lattice points composing the rectangular solids. At this time, the conversion table has to be referred to eight times for processing one input pixel value.
There has been proposed a device in which an idea is put to take out the lattice point in order to decrease the number of the referring times to the conversion table. A color converting device disclosed in Japanese Published Unexamined Patent Application No.
Hei 5-46750, for example, adopts an input color space of three colors and uses a vertex of a triangular prism to which the input pixel value belongs as a lattice point. By using six vertexes of the triangular prism that is decreased in number compared with eight vertexes of the rectangular solid, the number of referring times to the conversion table per one input pixel decreases from eight times to six times.
However, there occurs a problem of increasing an interpolation error when the referring lattice point is decreased in the interpolating processing. As the interpolation error increases, the color conversion error increases, to deteriorate a performance as a color converting device.
Further, the color converting device using the conversion table has a problem of increasing the number of referring times to the conversion table when the number of colors of the input color space increases. When the number of the input color space is designated by D, the number of the referring times to the Conversion table becomes 2D. Assuming that the vertex f D-dimensional rectangular solid is used as a lattice point, eighth reference per one pixel is required in the input color space of three colors of YMC, while sixteenth reference is required per one pixel in the input color space of four colors of YMCK.
In order to deal with the input color space of four colors, there has been proposed, for example, a device in which the input color space is limited to YMCK so that a conversion table of three colors of YMC is used and a conversion of K alone is performed like a color converting device disclosed in Japanese Published Unexamined Patent Application No. Hei 8-116456. This device can realize a color conversion with relatively high precision with less scale of the device under a condition that the generating method of K is not greatly changed between the input color space and the output color space. However, this device does not have a function of greatly changing the generating method of K in the output color space.
The conventional color converting device simplifies its converting method in order to realize a complicated conversion from the input color space into the output color space with less scale of the device. As a result, the precision of the color conversion is somewhat deteriorated, but the effect of reducing the scale of the device takes first priority.
However, high image quality is advanced with respect to an image output device such as a printing device or printer. There is a possibility that the conventional conversion precision cannot deal with these image output devices having high image quality. Therefore, it is important to avoid a technique that can be a factor to deteriorate the conversion precision. The following two points are specifically considered.
(1) To avoid a reduction in interpolation precision due to a simplification of the interpolating method such as a triangular prism interpolation.
(2) To color-convert the input pixel represented by four colors such as YMCK with high precision.
In order to attain the subjects, the interpolation may be made by referring to a sufficient number of lattice points in the input color space of four colors. However, as the number of input color and lattice point increases, the number of referring times to the conversion table increases, which becomes a problem. In case where a vertex of four-dimensional hypercube is referred to as a lattice point in the input color space comprising YMCK, for example, the conversion table has to be referred to sixteenth time in order to color-convert one input pixel. It is assumed here that image data of A4 size in JIS that is sampled with a resolution of 24(dots/mm) and quantized with a tone precision of 8 (bit/pixel) of each YMCK color is converted into an output color space of YMCK for one second. The image data is 35(Mpixel) in total, so that the input pixel value is inputted to the color converting device with a speed of 35(Mpixel/sec). At this time, the reading-out band of the conversion table reaches 35(Mpixel/sec)*16*4(Byte)=2.24(Gbyte/sec). Further, the capacity of the conversion table is 324*4(Byte)=4(Mbyte) if the dividing number of the input color space is 25=32 divisions per each color. Moreover, the order of access to the conversion table is determined depending upon the input pixel value, so that it cannot always be a continuous address, with the result that a high-speed reading-out method such as a burst access cannot be adopted. It is difficult to realize such high-speed memory part with large capacity having no regulation in the access pattern. If realized, there is a problem of large-scale device. FIG. 14 shows a processing speed per one page and a required reading-out band of the conversion table. As shown in the figure, a memory device having a reading-out band of giga-byte class and capable of doing a random access is required when the page exceeds 60 pages per minute. This is difficult to realize as it is.
In a color converting device interpolating by referring to a sufficient number of lattice points in an input color space of four colors, the present invention decreases the number of referring times to a conversion table without deteriorating a conversion precision to thereby prevent a scale of the device from becoming large.
The conversion table can be realized by a general memory device. The memory device that a high-speed access is possible is tend to have a small memory capacity, while the memory device with a large memory capacity is tend to have a slow access speed. A general-purpose computer includes a memory hierarchically composed in order to attain both high-speed access and large capacity memory. For example, a high-speed memory with small capacity, i.e., a cache memory is disposed in the vicinity of an arithmetical device, and a low-speed memory with large capacity, i.e., main memory is disposed at the position remote from the former memory. The original data is stored in the main memory. The data once read from the main memory by the arithmetical device is cached in the cache memory. When the same data is read by the arithmetical device, the data is read from the cache memory instead of the main memory. By this, a high-speed reading-out can be executed in case where the data once read by the arithmetical device from the main memory is repeatedly read out.
A coefficient cache memory is provided between the conversion table and the interpolating part of the color converting device for storing therein the interpolation coefficient that are once read from the conversion table by the interpolating part like the same view of the hierarchical memory of the general-purpose computer. In case where the same interpolation coefficient is read out, it is read out from the coefficient cache memory instead of the conversion table. By this, the number of the effective access times of the conversion table can be decreased, whereby the conversion table can be constructed with a lower-speed memory without decreasing the color conversion speed.
Although the concept is similar to the hierarchical memory of the general-purpose calculator, the following differences exist.
(1) Only the read-out data may be cached. A complicate operation for maintaining a consistency of data between the cache and main memory due to the writing is not required like the general-purpose calculator.
(2) A hit ratio of the cache is not enhanced by depending upon the characteristics of the inputted image data only by providing the coefficient cache memory. Conversely, the hit ratio can be enhanced by utilizing the characteristics of the inputted image data.
Therefore, the color converting device has a memory construction special for the color converting device as described later. Firstly, an outline of each method will be explained.
An out-of-order method performs a color conversion first from the input pixel value that can be interpolated by using the coefficient already cached in order to improve the hit ratio of the coefficient cache. The color conversion of the input pixel value is an independent processing depending only upon its pixel, so that the processing order of the input pixel data may be arbitrary. This method is the one in which the order of the color conversion is positively changed for improving the hit ratio.
A bit mixing method is the one in which, when the conversion table is constructed by a memory, an interpolation coefficient of the close lattice point in the input color space is also positioned at the close address in the memory-address space, to thereby improve the hit ratio of the cache. As general characteristics of image data, it is expected that, when one pixel value exists, a pixel value similar to the one pixel value exists in its vicinity. Specifically, in case where there is an input pixel value belonging to some subspace, a pixel value belonging to the subspace in its vicinity is easy to be inputted in the near future. Therefore, in the case of caching the interpolation coefficient, it is effective to cache the surrounding interpolation coefficient with the interpolation coefficient that generates a miss-hit. Generally, all data for a line size is cached with respect to the sequential addresses of the memory. Therefore, it is possible to cache the surrounding interpolation coefficient with the interpolation coefficient that generates a miss-hit by arranging the interpolation coefficient of the close lattice point in the input color space at the close address in the memory-address space.
A scan order changing method changes the order of the conversion processing of the input pixel value to the order in which the correlation between the pixels increases, to thereby improve the hit ratio of the coefficient cache. As general characteristics of image data, it is expected that, when one pixel value exists, a pixel value similar to the one pixel value exists in its vicinity as described above. Specifically, the correlation of the pixel value between the adjacent pixels is high. As for the inputting order of the input pixel value, a raster scanning order is frequently used in which a scanning is performed from right to left, and from top to bottom of the image. However, the raster scanning order only utilizes the correlation between pixels in an one-dimensional direction of an image. Therefore, a two-dimensional scanning order is established, to thereby utilize the correlation between pixels in the two-dimensional direction of the image, whereby the hit ratio is more improved.
A pre-reading method pre-reads the input pixel value for reading in advance the interpolation coefficient that is required in the future in order to improve the hit ratio of the coefficient cache. In the cache of the general-purpose computer, an instruction or data that is required in the future is confirmed only as a result of executing the instruction, whether it is an instruction cache or data cache. However, the interpolation coefficient is determined depending only upon the input pixel value. Therefore, the interpolation coefficient that is required in the future is confirmed if the inputting order of the input pixel value is determined. In case where the data not temporarily memorized in the general cache is read out, the data is read from the main memory having a low reading-out speed in general cache. Therefore, all processing is held during this period. It is expected that a similar pixel value is continuous as general characteristics of the image data. However, whether the cache is hit or not is fluctuated depending upon the input image as a matter of course. For example, it may occur that the several pixels are continuously hit to the cache, but then, several pixels are continuously miss-hit to the cache. The pre-reading method buffs such fluctuation to thereby enhance the reading-out speed of the average interpolation coefficient.
According to an aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace, a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace, and an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and the delta signal and outputs the output pixel value. The device also has a coefficient cache that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while outputs the index signal to the coefficient storing part and reads out the interpolation coefficient when an instruction for reading out the interpolation coefficient not temporarily stored is given.
By this construction, the color conversion can be performed by providing the cache without increasing the reading-out band of the conversion table.
According to another aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace, a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace, and an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and the delta signal and outputs the output pixel value. The device also has a coefficient cache that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while outputs the index signal to the coefficient storing part and reads out the interpolation coefficient when an instruction for reading out the interpolation coefficient not temporarily stored is given, an input buffer that temporarily stores in pairs the index signal and the delta signal that are outputted respectively from the index converting part and the delta converting part, and then, outputs the pair, an out-of-order controlling part that gives an instruction to the input buffer to read out the index signal temporarily stored therein and an instruction to the coefficient cache to read out the index signal temporarily stored therein, and then, compares the index signals with each other that are read out respectively from the input buffer and the coefficient cache, judges that the interpolation processing can be performed by using the cached interpolation coefficient when the index signals coincide with each other, gives an instruction to read out the pair of index signal and the delta signal from the input with a priority given to the signal that can be interpolated, and outputs the signal to the interpolating part, and an output buffer that temporarily stores the interpolated output pixel value at a position corresponding to the position designated in the instruction by the out-of-order controlling part to the input buffer to read out and output the output pixel value in the same order as that inputted by the pixel inputting part.
This construction follows the out-of-order method. The hit ratio can positively be improved by reading out first the coefficient from the hit index.
According to another aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, and a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace. The device also has a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace. The interpolation coefficient for the close lattice point in an input color space is stored in a close address in a memory-address space. The device further has an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and the delta signal and outputs the output pixel value, and a coefficient cache that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while outputs the index signal to the coefficient storing part and reads out the interpolation coefficient when an instruction for reading out the interpolation coefficient not temporarily stored is given.
This construction follows the bit mixing method. The hit ratio can be improved by reflecting the correlation of a color between the adjacent pixels to the memory-address.
According to another aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, a scan order converting part that changes the order of the input pixel value to increase a correlation between pixels and outputs the pixel value, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace, and a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace. The device also has an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and delta signal and outputs the output pixel value, a scan order reverse converting part that reversely converts an order of the output pixel value and outputs the output pixel value in the order same as the input pixel value outputted by the pixel inputting part, and a coefficient cache that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while outputs the index signal to the coefficient storing part and reads out the interpolation coefficient when an instruction for reading out the interpolation coefficient not temporarily stored is given.
This construction follows the scan order changing method, and performs a processing in the scan order for improving the hit ratio.
According to another aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace, and a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace. The device also has an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and delta signal and outputs the output pixel value, a coefficient cache that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while outputs the index signal to the coefficient storing part and reads out the interpolation coefficient when an instruction for reading out the interpolation coefficient not temporarily stored is given, and an input buffer that temporarily stores in pairs the index signal and the delta signal, and outputs the index signal and the delta signal in a manner of first-in-first-out.
This construction follows the pre-reading method and improves the hit ratio by precedently performing the reading-out.
According to another aspect of the present invention, the color converting device has a pixel value inputting part that inputs an input pixel value to a main body of the color converting device, an index converting part that outputs from the input pixel value an index signal showing a subspace to which the input pixel value belongs, a delta converting part that outputs from the input pixel value a delta signal showing a position of the input pixel value in the subspace, and a coefficient storing part that outputs from the index signal an interpolation coefficient of a lattice point positioned at a top of the corresponding subspace. The device also has an interpolating part that obtains an output pixel value by an interpolating processing from the interpolation coefficient and the delta signal and outputs the output pixel value, and a coefficient temporarily storing part that temporarily stores the interpolation coefficient read from the coefficient storing part and the corresponding index signal, outputs the interpolation coefficient instead of the coefficient storing part when an instruction for reading out the interpolation coefficient temporarily stored is given, while notifies the corresponding index signal to the controlling part when an instruction for reading out the interpolation coefficient not temporarily stored is given. The device further has an input buffer that temporarily stores in pairs the index signal and the delta signal that are outputted respectively from the index converting part and the delta converting part, and outputs the pair, a controlling part that gives an instruction to the input buffer to read out the index signal and the delta signal temporarily stored in a predetermined order, outputs the corresponding index signal to the coefficient storing part when an index signal not temporarily stored is notified from the coefficient temporarily storing part, and, upon receiving the corresponding interpolation coefficient from the coefficient storing part, causes the coefficient temporarily storing part to store the corresponding interpolation coefficient, and gives an instruction to the input buffer to output the corresponding index signal and the delta signal, and an output buffer that temporarily stores the interpolated output pixel value at a position corresponding to the position designated in the instruction by the out-of-order controlling part to the input buffer to read out, and outputs the output pixel value in the same order as that inputted by the pixel inputting part.
This construction follows the out-of-order method and improves the hit ratio like the former construction.
A color compensation is included in the color conversion in this specification.